package com.gui;

import javax.swing.*;
import java.awt.*;

public class GUI_2 extends JPanel {
    @Override
    public void paint(Graphics g) {
        GradientPaint gradientPaint=new GradientPaint(70,70,Color.blue,150,150,Color.green);
        Graphics2D graphics2D=(Graphics2D) g;
        graphics2D.setPaint(gradientPaint);
        graphics2D.fillOval(70,70,100,100);
    }
}

class Test_3 extends JFrame{
    JFrame jFrame ;
    GUI_2 g2;
    public Test_3(){
        jFrame = new JFrame();
        g2=new GUI_2();
        jFrame.setVisible(true);
        jFrame.setSize(500,500);
        jFrame.setDefaultCloseOperation(3);
        jFrame.add(g2);
    }
    public static void main(String[] args) {
        new Test_3();
    }
}
